<script setup>
import { reactive } from 'vue';

  const user = reactive({
    name: 'zhangsan',
    age: 18
  })

  const updateAge = () => {
    user.age += 1
  }
</script>

<template>
  <h2>userName: {{ user.name }}</h2>
  <h2>userAge: {{ user.age }}</h2>
  <button @click="updateAge">修改年龄</button>
</template>

<style scoped>

</style>
